<template>
  <div class="btns-container">
    <a-tag v-for="(item, index) in btnsOptions" class="fz14" @click="handleEmit(item.emit)" :key="item"
      :color="item?.color">{{ item.name }}</a-tag>
  </div>
</template>

<script lang='ts' setup>
import { ref, reactive, onMounted } from 'vue';
const emit = defineEmits(['saveAndContinue', 'save', 'cancel']);
type BtnsProps = {
  name: string;
  emit: string;
  color?: string;
};

const props = defineProps({
  btnsOptions: {
    type: Array<BtnsProps>,
    default: () => [],
  },
});
const handleEmit = (btnType: []) => {
  emit(btnType)
}
</script>
<style scoped lang='less'>
.btns-container {
  display: flex;
  justify-content: flex-end;
  padding: 10px 0;

  .fz14 {
    font-size: 14px;
    cursor: pointer;
  }
}
</style>